#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <SDL/sdl.h>
#include "image.h"
#include "sdl_utils.h"
Data Structures | |
| struct | t_sprite |
| A sprite is an image, to be displayed on the screen, at a given coord. It also got a bounding box for collisions stuff... More... | |
| struct | t_animation |
| struct | t_anim_sprite |
| A sprite with animations, it got a pointer to a simple sprite, and informations needeed to anmate it. the sprite'simage is the charset, and width and height are divded by the number of animations. Remember that t_anim_sprite must be manipulated with anim_sprite functions. More... | |
Functions | |
| void | anim_sprite_draw (anim_sprite *p_sprite, SDL_Surface *destination) |
| Draw an animated sprite. | |
| void | anim_sprite_update_frame (anim_sprite *p_sprite) |
| Update the frame of the animated sprite if it is time (frame_delay). | |
| int | anim_sprite_get_height (anim_sprite *p_sprite) |
| Get the anim_sprite height. | |
| int | anim_sprite_get_width (anim_sprite *p_sprite) |
| Get the anim_sprite width. | |
| int anim_sprite_get_height | ( | anim_sprite * | p_sprite | ) |
Get the anim_sprite height.
| int anim_sprite_get_width | ( | anim_sprite * | p_sprite | ) |
Get the anim_sprite width.
| void anim_sprite_update_frame | ( | anim_sprite * | p_sprite | ) |
Update the frame of the animated sprite if it is time (frame_delay).
1.5.4